package com.cdie.myschool.mapper.TeacherTermReportMapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.cdie.myschool.domain.entity.EduReform;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.Date;
import java.util.List;

/**
 * @program:my-school
 * @ClassName:EduReformMapper
 * @Description:教改项目
 * @author:毛康源
 * @data:2022-10-09 14:53
 **/
@Mapper
public interface EduReformMapper extends BaseMapper<EduReform> {
    @Select("select timestamp from educational_reform_project")
    List<EduReform> getEduTimeStampList();

    @Update("update educational_reform_project set semester_id=#{semesterId} where timestamp=#{timestamp}")
    int updateSemeterIdEdu(@Param("semesterId") Integer semesterId, @Param("timestamp") Date timestamp);

    @Select("select teacher_id from educational_reform_project")
    List<EduReform> getEduTeacherIds();
}
